// normal and vertex in the camera frame
varying vec3 v;
varying vec3 N;

// model view projection of light
uniform mat4 depthMVP;

uniform mat4 depthModelView;
uniform mat4 depthProj;

// bias matrix
uniform mat4 depthBias;

// coordinate in the shadowmap
varying vec4 ShadowCoord;

void main(void) {

	v = vec3(gl_ModelViewMatrix * gl_Vertex);
	N = normalize(gl_NormalMatrix * gl_Normal);

//	vec4 work_coord = gl_ModelMatrix * gl_Vertex;

	// TODO: 
	ShadowCoord = depthProj * depthModelView * gl_Vertex;

	gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
}